﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp3
{
    class Program
    {
        enum order
        {
            新订单,
            已发货,
            已签收,
            已评价
        }
        public enum fruit
        {
            哈密瓜 = 60,
            西瓜,
            奇异果,
            香蕉,
            苹果,
            草莓,
            葡萄
        }
        public enum zhiye
        {
            战士,
            法师,
            精灵
        }
        static void Main(string[] args)
        {
            E9(zhiye.战士);
            E9(zhiye.法师);
            E9(zhiye.精灵);
            Console.WriteLine("奇异果:" + E8(fruit.奇异果));
            Console.WriteLine("苹果" + E8(fruit.苹果));
            order o = order.已发货;
            Console.WriteLine(o);
            Student s1 = new Student("孙悟空");
            Student s2 = new Student("猪八戒");
            Student s3 = new Student("沙和尚");
            Student s4 = new Student("白龙马");
            s1.E6();
            s2.E6();
            s3.E6();
            s4.E6();
            Student.E7();
            s1.E6();
            s2.E6();
            s3.E6();
            s4.E6();
        }
        static void E1()
        {
            int[] a = new int[5];
            for (int i = 0; i < a.Length; i++)
            {
                Console.WriteLine("输入第" + (i + 1) + "个数");
                int b = int.Parse(Console.ReadLine());
                a[i] = b;
            }
            int max = 0;
            int min = 0;
            int sum = 0;
            int avg = 0;
            E2(ref max, ref min, ref avg, a);
            Console.WriteLine("最大数：" + max);
            Console.WriteLine("最小数：" + min);
            Console.WriteLine("和" + E2(ref max, ref min, ref avg, a));
            Console.WriteLine("平均数：" + avg);
            E3(out max, out min, out avg, a);
            Console.WriteLine("最大数：" + max);
            Console.WriteLine("最小数：" + min);
            Console.WriteLine("和" + E3(out max, out min, out avg, a));
            Console.WriteLine("平均数：" + avg);
        }
        static int E2(ref int max, ref int min, ref int avg, int[] a)
        {
            int sum = 0;
            for (int i = 0; i < a.Length; i++)
            {
                sum = sum + a[i];
            }
            Array.Sort(a);
            max = a[4];
            min = a[0];
            avg = sum / 5;
            return sum;
        }
        static int E3(out int max, out int min, out int avg, int[] a)
        {
            int sum = 0;
            for (int i = 0; i < a.Length; i++)
            {
                sum = sum + a[i];
            }
            Array.Sort(a);
            max = a[4];
            min = a[0];
            avg = sum / 5;
            return sum;
        }
        public static int E8(fruit f)
        {
            int score = (int)f;
            return score;
        }
        public static void E9(zhiye z)
        {
            switch (z)
            {
                case zhiye.战士:
                    Console.WriteLine("战士的技能：碎石打击、烈焰锚钩、战斗咆哮");
                    break;
                case zhiye.法师:
                    Console.WriteLine("法师的技能：巨浪冲击、元素突击、复仇杀戮");
                    break;
                case zhiye.精灵:
                    Console.WriteLine("精灵的技能：减速陷阱、能量浪潮、旋风剑舞");
                    break;
            }
        }

    }
}

